package com.swust.dumpling.commons;

import java.util.Properties;

public class SystemMessage {
	
	public static String OS_NAME;		//系统名
	public static String OS_ARCH;		//系统架构
	public static String OS_VERSION;	//系统版本信息
	public static String OS_USER;		//系统账号
	public static String PATH_SYMBOL;	//系统文件夹分隔符
	public static String OS_ENCODE;		//系统字符集
	
	
	static {
		Properties pro = System.getProperties();
		
		OS_NAME = pro.getProperty("os.name");
		OS_ARCH = pro.getProperty("os.arch");
		OS_VERSION = pro.getProperty("os.version");
		OS_USER = pro.getProperty("os.user");
		OS_ENCODE = pro.getProperty("sun.jnu.encoding");
		
		try {
			if (OS_NAME.toLowerCase().startsWith("window"))
				PATH_SYMBOL = "\\";		//windows
			else
				PATH_SYMBOL="/";		//Linux	
		} catch (Exception e) {
			PATH_SYMBOL="/";			//MAC
		}
		/*java.runtime.name=Java(TM) SE Runtime Environment
				sun.boot.library.path=C:\Program Files\Java\jre7\bin
				java.vm.version=23.25-b01
				java.vm.vendor=Oracle Corporation
				java.vendor.url=http://java.oracle.com/
				path.separator=;
				java.vm.name=Java HotSpot(TM) 64-Bit Server VM
				file.encoding.pkg=sun.io
				user.script=
				user.country=CN
				sun.java.launcher=SUN_STANDARD
				sun.os.patch.level=
				java.vm.specification.name=Java Virtual Machine Specification
				user.dir=F:\11\dumpling
				java.runtime.version=1.7.0_25-b17
				java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
				java.endorsed.dirs=C:\Program Files\Java\jre7\lib\endorsed
				os.arch=amd64
				java.io.tmpdir=C:\Users\xia\AppData\Local\Temp\
				line.separator=

				java.vm.specification.vendor=Oracle Corporation
				user.variant=
				os.name=Windows 8
				sun.jnu.encoding=GBK
				java.library.path=C:\Program Files\Java\jre7\bin;C:\Win...
				java.specification.name=Java Platform API Specification
				java.class.version=51.0
				sun.management.compiler=HotSpot 64-Bit Tiered Compilers
				os.version=6.2
				user.home=C:\Users\xia
				user.timezone=Asia/Shanghai
				java.awt.printerjob=sun.awt.windows.WPrinterJob
				file.encoding=UTF-8
				java.specification.version=1.7
				user.name=xia
				java.class.path=F:\11\dumpling\bin;E:\study\package\t...
				java.vm.specification.version=1.7
				sun.arch.data.model=64
				java.home=C:\Program Files\Java\jre7
				sun.java.command=com.swust.dumpling.commons.file.ZipFile
				java.specification.vendor=Oracle Corporation
				user.language=zh
				awt.toolkit=sun.awt.windows.WToolkit
				java.vm.info=mixed mode
				java.version=1.7.0_25
				java.ext.dirs=C:\Program Files\Java\jre7\lib\ext;C:...
				sun.boot.class.path=C:\Program Files\Java\jre7\lib\resour...
				java.vendor=Oracle Corporation
				file.separator=\
				java.vendor.url.bug=http://bugreport.sun.com/bugreport/
				sun.cpu.endian=little
				sun.io.unicode.encoding=UnicodeLittle
				sun.desktop=windows
				sun.cpu.isalist=amd64*/
	}
}
